Skip to content

fix(init): keep cursor setup out of claude config - #3290

Open
ousamabenyounes wants to merge 1 commit into
rtk-ai:developfrom
ousamabenyounes:fix/init-cursor-instructions-dir
Open

fix(init): keep cursor setup out of claude config#3290
ousamabenyounes wants to merge 1 commit into
rtk-ai:developfrom
ousamabenyounes:fix/init-cursor-instructions-dir

Conversation

@ousamabenyounes

Copy link
Copy Markdown
Contributor

Summary

  • Treat Cursor init as a Cursor-only setup path instead of running Claude setup first.
  • Ensure the Cursor config directory exists before atomically writing hooks.json.

Test verification (RED -> GREEN)

RED on upstream-base behavior with the new regression test:

called `Result::unwrap()` on an `Err` value: Failed to write RTK.md: /tmp/.tmpGNCwuf/.claude/RTK.md
Caused by:
    0: Failed to create temp file in /tmp/.tmpGNCwuf/.claude
    1: No such file or directory (os error 2)
test hooks::init::tests::test_cursor_global_init_does_not_require_claude_dir ... FAILED

GREEN after the fix:

Cursor hook registered (global).
hooks.json: RTK preToolUse entry added
test hooks::init::tests::test_cursor_global_init_does_not_require_claude_dir ... ok

Full local CI replay:

cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test --all
test result: ok. 2512 passed; 0 failed; 8 ignored; 0 measured; 0 filtered out

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test --all
  • Manual testing: rtk init --global --agent cursor behavior covered by regression test

Fixes #3282

Important: All PRs must target the develop branch (not master).

@ousamabenyounes
ousamabenyounes force-pushed the fix/init-cursor-instructions-dir branch 3 times, most recently from 701e462 to b53b850 Compare July 29, 2026 00:49
@ousamabenyounes
ousamabenyounes force-pushed the fix/init-cursor-instructions-dir branch from b53b850 to 7ebb34e Compare July 29, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RTK init want to install in .claude when using another agent

1 participant